package com.hmall.clients;

import com.hmall.pojo.Address;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Description AddressClient
 * @Author dmx
 * @Date 2024-11-16
 */
@FeignClient("userservice")
@RequestMapping("/address")
public interface AddressClient {
    @GetMapping("{id}")
    Address findAddressById(@PathVariable("id") Long id);

    @GetMapping("/uid/{userId}")
     List<Address> findAddressByUserId(@PathVariable("userId") Long userId);
}
